<template>
    <transition name="tips">
        <div class="layermain" v-if="visible">
            <div class="layer">
                <div class="con">
                    <slot name="icon"></slot>
                    <slot name="title"></slot>
                    <slot></slot>
                    <slot name="tips"></slot>
                    <div class="btnbox">
                        <div class="u-btn cancel" @click="CloseClick">{{cancel?cancel:"取消"}}</div>
                        <slot name="sureBtn"></slot>
                    </div>
                </div>
            </div>
        </div>
    </transition>
</template>

<script>
export default {
    name: "Layer",
    data() {
        return {
        }
    },
    props: {
        visible: Boolean,
        cancel: String
    },
    mounted() {

    },
    methods: {        
        //关闭弹层
        CloseClick(){
            this.$emit('change',{visible: false});

        },
    }
}
</script>
<style lang="scss">

</style>    